<template>
  <div class="dashboard-container">
    <!-- 头部内容 -->
    <el-card class="header-card">
      <div>
        <div class="fl headL">
          <div class="headImg">
            <img :src="`http://122.51.249.55:7005/${$store.getters.avatar}`">
          </div>
          <div class="headInfoTip">
            <p class="firstChild">
              早安，{{ $store.getters.username }}，祝你开心每一天！
            </p>
            <p class="lastChild">
              早安，{{ $store.getters.username }}，祝你开心每一天！
            </p>
          </div>
        </div>
        <div class="fr" />
      </div>
    </el-card>
    <!-- 主要内容 -->
    <el-row type="flex" justify="center">
      <el-card class="box-card">
        <div slot="header" class="header">
          <span>工作日历</span>
        </div>
        <el-carousel autoplay>
          <el-carousel-item v-for="item in list" :key="item">
            <!-- <h3 class="small">{{ item }}</h3> -->
            <img :src="item" alt="" srcset="">
          </el-carousel-item>
        </el-carousel>
      </el-card>
    </el-row>
    <el-row type="flex" justify="space-between">
      <!-- 左侧内容 -->

      <el-col :span="13" style="padding-right: 26px">
        <!-- 工作日历 -->
        <el-card class="box-card">
          <div slot="header" class="header">
            <span>工作日历</span>
          </div>
          <!-- 放置日历组件 -->
          <work-calendar />
        </el-card>
      </el-col>
      <!-- 右侧内容 -->
      <el-col :span="11">
        <!-- 绩效指数 -->
        <el-card class="box-card">
          <div slot="header" class="header">
            <span>绩效指数</span>
          </div>
          <!-- 放置雷达图 -->
          <radar />
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script>
// import { mapGetters } from "vuex";
import Radar from './components/radar.vue'

import WorkCalendar from './components/work-calendar.vue'

export default {
  name: 'Dashboard',
  components: {
    WorkCalendar,
    Radar
  },
  data() {
    return {
      list: [
        'http://static.mayikt.com/web%E5%89%8D%E7%AB%AF%E5%BF%AB%E9%80%9F%E5%85%A5%E9%97%A8.jpg',
        'http://static.mayikt.com/JavaWeb%E6%A0%B8%E5%BF%83%E6%8A%80%E6%9C%AF%E5%AE%9E%E6%88%98.jpg',
        'http://static.mayikt.com/2020%E9%87%91%E4%B8%89%E9%93%B6%E5%9B%9B%E9%9D%A2%E8%AF%95%E9%A2%98%E8%AE%B2%E8%A7%A3.jpg',
        'http://static.mayikt.com/course-20210811.jpg',
        'http://static.mayikt.com/%E6%96%B0.jpg'
      ]
    }
  },
  computed: {}
}
</script>

<style lang="scss" scoped>
::v-deep .el-carousel__container {
  width: 800px;
  height: 440px;
  img {
    width: 100%;
    height: 100%;
  }
}
.dashboard-container {
  margin: 10px;
  li {
    list-style: none;
  }
  .headImg {
    float: left;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #999;
    img {
      width: 100%;
      height: 100%;
      border-radius: 50%;
    }
  }

  .headInfoTip {
    padding: 25px 0 0;
    margin-left: 120px;
    p {
      padding: 0 0 15px;
      margin: 0;
      &.firstChild {
        font-size: 24px;
      }
      &.lastChild {
        font-size: 20px;
        color: #7f8c8d;
      }
    }
  }
}

.box-card {
  padding: 5px 10px;
  margin-top: 20px;
  .header {
    span {
      color: #2c3e50;
      font-size: 24px;
    }
    .item {
      color: #97a8be;
      float: right;
      padding: 3px 0;
    }
  }
  .headTit {
    span {
      border-bottom: 4px solid #8a97f8;
      padding-bottom: 10px;
    }
  }
}
.header-card {
  position: relative;
  .header {
    position: absolute;
    right: 20px;
    top: 15px;
    z-index: 1;
  }
}

.advContent {
  background: #fff;
  border-radius: 5px 5px 0px 0px;
  .title {
    font-size: 16px;
    padding: 20px;
    font-weight: bold;
    border-bottom: solid 1px #ccc;
  }
  .contentItem {
    padding: 0 30px;
    min-height: 350px;
    .item {
      display: flex;
      padding: 18px 0 10px;
      border-bottom: solid 1px #ccc;
      .col {
        color: #8a97f8;
      }
      img {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        margin-right: 10px;
      }
      p {
        padding: 0 0 8px;
      }
    }
  }
}
.noticeList {
  margin: 0;
  padding: 0;
}
.sideNav,
.sideLink {
  padding: 30px 0 12px;
  .sideBtn {
    padding: 16px 26px;
    font-size: 16px;
    margin: 10px 5px;
  }
}
.sideLink {
  text-align: center;
  .icon {
    display: inline-block;
    width: 76px;
    height: 76px;
    // background: url("./../../assets/common/icon.png") no-repeat;
  }
  .iconGuide {
    background-position: 0 0;
  }
  .iconHelp {
    background-position: -224px 0;
  }
  .iconTechnology {
    background-position: -460px 0;
  }
}
</style>
